/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.geomagnetic_sensor.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 地磁传感器信息Entity
 * @author xlp
 * @version 2019-04-12
 */
public class GeomagneticSensor extends DataEntity<GeomagneticSensor> {
	
	private static final long serialVersionUID = 1L;
	private String sensorCode;		// 传感器编号
	private String lane;		// 车道id
	private String sensorDesc;		// 传感器描述
	private String ip;		// ip
	private String port;		// 端口
	private String location;		// 地磁位置
	private String status;		// 地磁状态
	private Date creatTime;		// 创建时间
	private Date updateTime;		// 更新时间

	private String areaId;//区域id

	public String getAreaId() { return areaId; }
	public void setAreaId(String areaId) { this.areaId = areaId; }

	public GeomagneticSensor() {
		super();
	}

	public GeomagneticSensor(String id){
		super(id);
	}

	@Length(min=0, max=64, message="传感器编号长度必须介于 0 和 64 之间")
	public String getSensorCode() {
		return sensorCode;
	}

	public void setSensorCode(String sensorCode) {
		this.sensorCode = sensorCode;
	}
	
	@Length(min=0, max=64, message="车道id长度必须介于 0 和 64 之间")
	public String getLane() {
		return lane;
	}

	public void setLane(String lane) {
		this.lane = lane;
	}
	
	@Length(min=0, max=64, message="传感器描述长度必须介于 0 和 64 之间")
	public String getSensorDesc() {
		return sensorDesc;
	}

	public void setSensorDesc(String sensorDesc) {
		this.sensorDesc = sensorDesc;
	}
	
	@Length(min=0, max=64, message="ip长度必须介于 0 和 64 之间")
	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}
	
	@Length(min=0, max=64, message="端口长度必须介于 0 和 64 之间")
	public String getPort() {
		return port;
	}

	public void setPort(String port) {
		this.port = port;
	}
	
	@Length(min=1, max=2, message="地磁位置长度必须介于 1 和 2 之间")
	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}
	
	@Length(min=1, max=1, message="地磁状态长度必须介于 1 和 1 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreatTime() {
		return creatTime;
	}

	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
}